
\setupregister
[index]
[pagesegments=1:4,
indicator=no,
%pagemethod=default,   %%%    see next example
%pagemethod=page, 
pagemethod=section,
]

\defineprocessor [relevant] [style=italic,color=red]

\setuphead[part][placehead=yes,number=yes,incrementnumber=yes]

\starttext

\part{sdfds}
\chapter {one} \section {alpha}

x\index {whatever 1}x\index {whatever 2}x\index {whatever 2}x \page

x\index {whatever 1}x\index {whatever 2}x\index {whatever 2}x \page

\chapter {one}
x\index {whatever 1}x\index {whatever 2}x\index {whatever 2}x \page

\section {alpha}
%%  带processor的命令。如果不现实页码。则不会应用该processor
\index[relevant->MOUMO]{MOUMO+MOUMOsdfdsfds}
\index[relevant->]{MOUMO+MOUMOssjys}
Text \index{relevant->bar}text.
Text \index{relevant->bar+rty}text.
%%
x\index {whatever 1}x\index {whatever 2}x\index {whatever 2}x \page

x\index {whatever 1}x\index {whatever 2}x\index {whatever 2}x \page

\section {beta}

x\index {whatever 1}x\index {whatever 2}x\index {whatever 2}x \page

x\index {whatever 1}x\index {whatever 2}x\index {whatever 2}x \page

\title{ index of keyword}
\placeindex[n=1]

\stoptext
